#!/bin/sh
#
# /etc/rc.d/acpid: start/stop acpid daemon
#

. /etc/rc.subr

NAME="ACPI event daemon"
PROG=/usr/sbin/acpid
PIDFILE=/var/run/acpid.pid
OPTS="-p $PIDFILE"

case $1 in
	start)
		msg "Starting $NAME..."
		start_daemon -p $PIDFILE $PROG $OPTS
		;;
	stop)
		msg "Stopping $NAME..."
		stop_daemon -p $PIDFILE $PROG
		;;
	restart)
		$0 stop
		sleep 1
		$0 start
		;;
	status)
		status_daemon -p $PIDFILE $PROG
		;;
	*)
		echo "usage: $0 [start|stop|restart|status]"
		;;
esac

# End of file
